//
//  MyPlatformView.m
//  app
//
//  Created by yanjunliang on 2024/12/24.
//



#import "MyPlatformView.h"
#import "WebKit/WKWebView.h"

@implementation MyPlatformView {
    WKWebView *webView;
    UIView *platView;
    UILabel *labelView;
    NSString* viewTag;
}

- (instancetype)initWithFrame
{
    viewTag = @"PlatformViewTest1";
    
    platView=[[UIView alloc] init];
    
    labelView= [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 100)];
    labelView.textColor= [UIColor blueColor];
    labelView.text= @"原生区域";
    
    
    webView = [[WKWebView alloc] init];
    webView.UIDelegate = self;
    webView.navigationDelegate = self;
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.baidu.com"]]];

    [webView addSubview:labelView];
    
    [platView addSubview:webView];
//    [platView addSubview:labelView];
//    mapView = [[IMapView alloc] init];
//    mapView.showsCompass = YES;
//    mapView.showsScale = YES;
//
//    [mapView setMapType:MKMapTypeStandard];
//    mapView.showsUserLocation = YES;

    return self;
}

- (UIView*) view {
    return webView;
}
- (void)onDispose {
    return;
}
- (NSString*) getPlatformViewID {
    return viewTag;
}

@end
